﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ERPStudio;

namespace ResUma
{
    public partial class CautaPersonalFrm : FrmCard
    {
        public String Filtru;
        public CautaPersonalFrm(ModuleClass mc): base(mc)
        {
            InitializeComponent();
        }

        private void CautaPersonalFrm_Load(object sender, EventArgs e)
        {
            AddButton("Filtreaza", global::ERPStudio.Properties.Resources._001_07, Filtreaza, ToolStripItemAlignment.Right, false);
        }

        private void Filtreaza(object sender, EventArgs e)
        {
            Filtru = String.Empty;
            if (MarcaTB.Text != String.Empty)
                Filtru = "Marca='" + MarcaTB.Text +"'";
            else
                Filtru = "NumePrenume like '%" + NumeTB.Text + "%'";
            DialogResult = System.Windows.Forms.DialogResult.OK;
            Close();
        }
    }
}
